<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  <div id="app">
      <my></my>
      {{msg}}
  </div>
  <script src="./vue.js"></script>
  <script>
      Vue.component("my",{
          data() {
              return {
                  msg:"good component"
              }
          },
          template: `<h2>{{msg}}</h2>`
      })

    var vm = new Vue({
      el:'#app',
      data:{
        msg:"我是根组件"
      },
      methods:{
        
      }
     });
  </script>
</body>
</html>
